package com.lxl.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * (Blog)表实体类
 *
 * @author makejava
 * @since 2022-03-10 17:22:09
 */
@SuppressWarnings("serial")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("m_blog")
public class Blog implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId
    private Long id;

    
    private Long userId;

    @NotBlank(message = "标题不能为空")
    private String title;

    @NotBlank(message = "摘要不能为空")
    private String description;

    @NotBlank(message = "内容不能为空")
    private String content;
    
    private Integer status;

    @JsonFormat(pattern="yyyy-MM-dd")
    private LocalDateTime created;



}

